package com.jwm.power;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;

@MapperScan("com.jwm.power.mapper")	//扫描Mapper接口所在的包，产生与之对应的动态代理对象
@EnableTransactionManagement
@SpringBootApplication
@EnableScheduling
@ServletComponentScan(basePackages = "com.jwm.power.filter")
public class HeatControlServerApplication extends SpringBootServletInitializer {

	/**
	 * 发布war包时用的
	 * @param builder
	 * @return
	 */
	@Override
	protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
		return builder.sources(HeatControlServerApplication.class);
	}

	public static void main(String[] args) {
		SpringApplication.run(HeatControlServerApplication.class, args);
	}

}
